package com.xiaoh.dormitoryrepairreportbackend.model.dto.workorder;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 工单查询请求
 * 支持游标分页和页码显示的混合模式
 */
@Data
@Schema(description = "工单查询请求")
public class WorkOrderQueryRequest implements Serializable {

    @Schema(description = "报修人账号")
    private String reporterAccount;

    @Schema(description = "处理人账号")
    private String handlerAccount;

    @Schema(description = "报修类别ID")
    private Integer categoryId;

    @Schema(description = "报修类别名称")
    private String categoryName;

    @Schema(description = "工单标题")
    private String title;

    @Schema(description = "报修地址")
    private String location;

    @Schema(description = "工单状态(1:待处理, 2:处理中, 3:已完成, 4:已评价, 0:已取消)")
    private Integer status;

    @Schema(description = "创建时间开始")
    private LocalDateTime createdAtStart;

    @Schema(description = "创建时间结束")
    private LocalDateTime createdAtEnd;

    @Schema(description = "页面大小", example = "10")
    private Integer pageSize = 10;

    @Schema(description = "当前页码，用于前端分页组件显示", example = "1")
    private Long current = 1L;

    @Schema(description = "游标ID，用于游标分页查询（性能优化）")
    private Long lastId;

    private static final long serialVersionUID = 1L;
}
